<?php
error_reporting(E_ALL ^ E_NOTICE);
require_once('config.php');
$id_customer = $_POST['id_customer'];

$return_arr = array();

if(!empty($id_customer)){
	$fetch = mysql_query("SELECT * FROM tb_customer WHERE id_customer = '" . mysql_real_escape_string($id_customer) . "' "); 
		$ono = mysql_num_rows($fetch);
		/* Retrieve and store in array the results of the query.*/
		while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) {
			$row_array['id_customer'] = $row['id_customer'];
			$row_array['alamat'] = $row['alamat'];
	        array_push($return_arr,$row_array);
	    }
}

//print_r ($return_arr);
echo json_encode($return_arr);
?>